<template>
  <!-- 方案规划导航栏 -->
   <div style="width: 100%;height: 100%;text-align: center;">

 
  <div style="display: inline-flex;width: 100%;height: 10%;margin-top: 1vh;text-align: left;">
    
    <div style="display: flex;" class="box">
 
      <el-form :inline="true" :model="formInline" style="margin-left: 2vh;margin-top: 1vh;width: 91%;" class="demo-form-inline">
        <el-form-item label="需求侧氢⽓负荷数据类型:">

          <el-radio-group v-model="dataType">
            <el-radio label="固定氢⽓负荷(kg/天)"></el-radio>
            <el-radio label="⼩时氢⽓负荷(kg/天)"></el-radio>
            <el-radio label="⽇氢⽓负荷(kg/天)"></el-radio>
            <el-radio label="⽉氢⽓负荷(kg/天)"></el-radio>
          </el-radio-group>

        </el-form-item>
      
      </el-form>
      
      <div style="margin-top: 0.7vh;    width: 20%;text-align: right;margin-right: 1vh;">
        <el-button type="primary" @click="clickProject('load')" style="width: 110px">
          <span class="button-text">下载模板</span>
        </el-button>
        <el-button type="primary" @click="clickProject('load')" style="width: 110px">
          <span class="button-text">上传</span>
        </el-button>
      </div>

       
    </div>

  </div>

  <div class="box1">
     <div id="lineCharts" style="width: 98%;height: 98%;margin: 0 auto;"></div>
  </div>

</div>
  
</template>

<script>

  // 引入基本模板,按需加载
  let echarts = require('echarts/lib/echarts');

  
let axisData = ['1日','2日','3日','4日','5日','6日','7日','8日','9日','10日','11日','12日','13日','14日','15日','16日','17日','18日','19日','20日','21日','22日','23日','24日','25日','26日','27日','28日','29日','30日']
let seriesData = [
   [92.8872,92.6444,89.7734,97.2053,93.2683,92.2416,95.2624,86.5186,91.2479,91.3806,91.8299,89.3534,92.4887,86.9958,91.6448,92.3078,91.348,92.1586,89.9026,92.529,90.6807,88.1117,90.8095,90.1901,89.3808,92.44,91.5109,90.9205,90.3345,94.7832
]
]

var lineOption = {
   //backgroundColor: '#0F224C', //背景色
   title: {
		text: '',
		textStyle: {
			color: '#FFF',
			fontSize: 20
		},
		top:"2%",
		left: 'center',
// 		right: '5%'
	},
   grid: {
      left : '3%',
      right : '3%',
      bottom : '5%',
      top : '20%',
      containLabel: true
   },
   tooltip: {
      trigger: "axis",
      axisPointer: {
         lineStyle: {
            color: "rgba(255,255,255,0.7)"
         }
      },
      backgroundColor: "rgba(255,255,255,0.1)",
      padding: [5, 10],
      textStyle: {
         color: "rgb(255,255,255)"
      }
   },
   legend: {
      x: "center",
      y: "bottom",
      icon: "circle",
      itemWidth: 12,
      itemHeight: 12,
      itemGap: 60,
      textStyle: {
         color: "#C0C4CC",
         fontSize: 13,
         fontWeight: 'bold',
      },
      data: [""]
   },
   xAxis: {
      type: "category",
      data: axisData,
      boundaryGap: true,
      splitLine: {
         show: false
      },
      axisTick: {
         show: false
      },
      // type: 'dashed',
      axisLine: {
         lineStyle: {
            type: 'dashed',
            color: "#2557B4"
         }
      },
      axisLabel: {
         margin: 10,
         textStyle: {
            fontSize: 14,
            color: "#C0C4CC"
         }
      }
   },
   yAxis: [
      {
         type: "value",
         position: "center",
         name: '（MW）',
         scale : true,
         nameTextStyle: {
            padding: [0, 80, 0, 0],
            color: '#C0C4CC',
            fontSize: 13,
            fontWeight: 'bold',
            // lineHeight: 40,
         },
         splitLine: {
            show: true,
            lineStyle: {
               type: 'dashed',
               color: "#C0C4CC"
            }
         },
         axisLine: {
            show: true,
            lineStyle: {
               color: "rgba(255,255,255,0.3)"
            }
         },

         axisLabel: {
            show: true,
            margin: 2,
            textStyle: {
               fontSize: 12,
               color: "#DEEBFF"
            }
         }
      },],
   series: [
      {
         name: "数据",
         type: "line",
         smooth: true,
         showSymbol: false,
         symbol: 'circle',
         // showSymbol: true,
         // symbol: 'circle',
         data: seriesData,
         itemStyle: {
            normal: {
               color: '#287CE8'
            }
         },
         lineStyle: {
            normal: {
               width: 3
            }
         },


      }
      
   ]
}



  export default {
    name: 'hydrogenProductionPathway',
    data() {
      return {
        form: {
          name: '',
          region: '',
 
        },
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }],
        activeDate: '',
        type: '',
        dataType:""
      }
    },
    mounted: function() {
      
      let lineCharts = this.$echarts.init(document.getElementById('lineCharts'))
 
      lineCharts.clear(); 

      lineCharts.setOption(lineOption); 

      window.onresize = function(){
        lineOption.resize(); 
      }

    },
    methods: {
      buttonClick : function(type,divId){
        for(var i = 1;i<=6;i++){
          $("#hpDiv"+i).css("background","#1f2c6c3b");
        }
        $("#"+divId).css("background","#409EFF");
        this.activeDate = new Date().getTime();
        //路由跳转
        //this.$router.push('/'+type)
      }, 
       
    }
  }
</script>



<style>
/* 
.el-table{
  background-color: rgb(20 34 78);
  color: #FFFFFF;
  border-color: rgb(24 63 124 / 51%);
  *{
    border-color: rgb(24 63 124 / 51%) !important;
  }
  .el-table__header-wrapper{
    tr{
      background-color: rgb(10 24 90 / 81%);
      th{
        color: #ffffff;
        background-color: rgba(0,0,0,0.4);
      }
    }
  }
  .el-table__body-wrapper{
    tr{
      background-color: rgb(8 26 80 / 88%);
      &:hover>td{      
        background-color: rgb(13 30 80);
      }
    }
  }
} */
  .el-form--inline .el-form-item__content {
      display: inline-block;
      vertical-align: middle;
      margin-left: 1vh;
  }

  .el-radio {
      color: #eff4ff;
      cursor: pointer;
      margin-right: 30px;
  }

  .el-form-item {
      margin-bottom: 5px;
  }
  .el-form-item__label {
      text-align: right;
      vertical-align: middle;
      float: left;
      font-size: 14px;
      color: #f2f2f2;
      line-height: 40px;
      padding: 0 1px 0 0;
      -webkit-box-sizing: border-box;
      box-sizing: border-box;
  }
  .el-input__inner { 
      background-color: #202b6180;
      background-image: none;
      border-radius: 4px;
      border: 1px solid #5c7bc5;
      -webkit-box-sizing: border-box;
      box-sizing: border-box;
      color: #a3aec5;
      display: inline-block;
      font-size: inherit;
      height: 40px;
      line-height: 40px;
      outline: 0;
      padding: 0 15px;
      -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
      transition: border-color .2s cubic-bezier(.645,.045,.355,1);
      width: 100%;
  }

  .el-input-group__append, .el-input-group__prepend {
    background-color: #305997;
    color: #ffffff;
    vertical-align: middle;
    display: table-cell;
    position: relative;
    border: 1px solid #506aa7;
    border-radius: 4px;
    padding: 0 20px;
    width: 1px;
    white-space: nowrap;
  }
</style>


<style scoped> 

  /* 设定地图的大小 */
  #allmap{
    height: 350px;
    width: 100%;
  }

  .buttonStyle {
    height: 4vh;
    width: 24vh;
    display: inline-block;
    -webkit-border-radius: 60px;
    -moz-border-radius: 60px;
    cursor: pointer;
    border-radius: 10px;
    font-family: Arial;
    border: none;
    color: #ffffff;
    font-size: 1.6vh;
    background: #1f2c6c3b;
    border-bottom: 1px solid rgb(64, 158, 255);
    margin: 1.5vh 10px;
    text-align: center;
    line-height: 4vh;
    vertical-align: middle;
    text-decoration: none;
  }

  .box{ 
    width: 98%;
    height: 6vh;
    margin: auto;
    border-radius: 5px;
    margin: auto;
    background: #202b614f;
    border: 1px solid rgb(62 111 219 / 88%);
  }

  .box1{ 
    width: 96%;
    height: 60vh;
    margin-top: 1vh;
    margin: 0 auto;
    top: 18vh;
    left: 3.5vh;
    position: absolute;
    border-radius: 5px;
    margin: auto;
    background: #202b614f;
    border: 1px solid rgb(62 111 219 / 88%);
  }

  .box2{ 
    width: 96%;
    height: 29vh;
    margin-top: 1vh;
    margin: 0 auto;
    top: 49.5vh;
    left: 3.5vh;
    position: absolute;
    border-radius: 5px; 
    background: #202b614f;
    border: 1px solid rgb(62 111 219 / 88%);
  }

  .titleCss{
    font-size: 22px;
    font-family: inherit;
    font-weight: 500;
    line-height: 1.2;
    color: #f2f2f2;
  }
</style>
